*Black, Owens, Wedeking & Wohlfarth
*Chapter 4 Replication

use "Ch-4_Data.dta"

*Table 4.1
*Model 1
logit vote_numeric c.consciPI##i.conflictord openPI extraPI agreePI neuroPI, robust

*Model 2
logit vote_numeric c.consciPI##i.conflictord openPI extraPI agreePI neuroPI us_wants us_nowant lctreverse lctdissent lctstrike unpublished_opinion amicus uslw_article outcome_closer, robust

*Figure 4.5(a)
quietly margins, dydx(3.conflictord) at(consciPI=(-1.90(.1)0.90))
marginsplot, xlabel(-1.90(.4)0.90) ylabel(-.1(.1).4) plotopt(msymbol(none)) ciopts(color(gs10)) ylin(0) recastci(rarea) level(90) xtitle(Supreme Court Justice Conscientiousness) ytitle(Average Marginal Effect of Strong Conflict) title("") scheme(s1mono) legend(off)  

*Figure 4.5(b)
quietly margins, dydx(1.conflictord) at(consciPI=(-1.90(.1)0.90))
marginsplot, xlabel(-1.90(.4)0.90) ylabel(-.1(.1).4) plotopt(msymbol(none)) ciopts(color(gs10)) ylin(0) recastci(rarea) level(90) xtitle(Supreme Court Justice Conscientiousness) ytitle(Average Marginal Effect of Alleged Conflict) title("") scheme(s1mono) legend(off)  

*Figure 4.5(c)
quietly margins, dydx(2.conflictord) at(consciPI=(-1.90(.1)0.90))
marginsplot, xlabel(-1.90(.4)0.90) ylabel(-.1(.1).4) plotopt(msymbol(none)) ciopts(color(gs10)) ylin(0) recastci(rarea) level(90) xtitle(Supreme Court Justice Conscientiousness) ytitle(Average Marginal Effect of Weak Conflict) title("") scheme(s1mono) legend(off)  


*Table 4.2
*Model 1
logit voteJ3 consciPI openPI extraPI agreePI neuroPI, robust

*Model 2
logit voteJ3 consciPI openPI extraPI agreePI neuroPI i.conflictord us_wants us_nowant lctreverse lctdissent lctstrike unpublished_opinion amicus uslw_article outcome_closer, robust

*Figure 4.6
quietly margins, at(consciPI=(-1.90(.1)0.90)) vsquish
marginsplot, xlabel(-1.90(.4)0.90) plotopt(msymbol(none)) ciopts(color(gs10)) recastci(rarea) level(90) xtitle(Supreme Court Justice Conscientiousness) ytitle(Predicted Probability of a Join-3 Vote) title("") scheme(s1mono) legend(off)


*Table 4.3
*Model 1
logit strat_grant consciPI openPI extraPI agreePI neuroPI, robust

*Model 2
logit strat_grant consciPI openPI extraPI agreePI neuroPI i.conflictord us_wants us_nowant lctreverse lctdissent lctstrike unpublished_opinion amicus uslw_article freshman median_prob outcome_statquo_difference procedure_ratio, robust

*Figure 4.7
quietly margins, at(consciPI=(-1.90(.1)0.90)) 
marginsplot, xlabel(-1.90(.4)0.90) plotopt(msymbol(none)) ciopts(color(gs10)) recastci(rarea) level(90) xtitle(Supreme Court Justice Conscientiousness) ytitle(Predicted Probability of a Strategic Grant Vote) title("") scheme(s1mono) legend(off)

*Model 3
logit strat_deny consciPI openPI extraPI agreePI neuroPI, robust

*Model 4
logit strat_deny consciPI openPI extraPI agreePI neuroPI i.conflictord us_wants us_nowant lctreverse lctdissent lctstrike unpublished_opinion amicus uslw_article freshman median_prob outcome_statquo_difference procedure_ratio, robust

